@extends('layouts.master3')
@section('content')
<div class="contain" style="margin:0 auto;">
<div style="padding:10px;border:1px solid #ddd;">
<textarea id="one" style="display:none;">
<?php echo $c1;?>
</textarea>
<textarea id="two" style="display:none;">
<?php echo $c2;?>
</textarea>
<div id="html"></div>

<div style="text-align:right;">----shinian 于2016-06-25 14:50:57 编辑</div>
</div>
</div>
@stop
@section('js')
<script src="/js/diffHTML.js"></script>
<script>
var diff=new diff_match_patch();
   // function compare(){
        var one=document.getElementById("one").value;
        var two=document.getElementById("two").value;
        var d=diff.diff_main(one,two);
        diff.diff_cleanupSemantic(d);
        var ds=diff.diff_prettyHtml(d).replace("¶","");
        console.log(ds);
        document.getElementById("html").innerHTML=ds.replace("¶","");
   // }
</script>
@stop
